package com.imooc.BST;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * 测试删除最大值最小值
 */
public class MaxMinMain {

    public static void main(String[] args) {
        BST<Integer> bst = new BST<>();
        int n = 1000;
        Random random = new Random();
        for(int i = 0; i < n; i++) {
            bst.add(random.nextInt(10000));
        }
        List<Integer> list = new ArrayList<>();
        while(!bst.isEmpty()) {
            list.add(bst.removeMin());
        }

        System.out.println(list);
    }
}
